﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Model;
using Newtonsoft.Json.Linq;
using BLL;
using DAL;
using IDAL;
/***************************
 * API
 * 勘察数据
 * Author：JXL
 ***************************/ 
namespace EstateService.Controllers
{
    public class prospectController : ApiController
    {
        BLL.IFactory<Iprospect, prospectDAL> bll = new Factory<Iprospect, prospectDAL>();
        Factory<Iprospect, prospectDAL> fa = new Factory<Iprospect, prospectDAL>();
        // GET api/prospect
        /// <summary>
        /// 列表展示
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="wherestr"></param>
        /// <returns></returns>
        [HttpGet]
        [ActionName("listget")]
        public pagelist<Basic_infoss> listGet(int pageindex, int pagesize, string wherestr,int id)
        {
            return fa.bll().getlist(pageindex, pagesize, wherestr,id);
        }

        // GET api/prospect/5
        public string Get(int id)
        {
            return "value";
        }

        // POST api/prospect
        public void Post([FromBody]string value)
        {
        }

        // PUT api/prospect/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/prospect/5
        public void Delete(int id)
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        [HttpPost]
        [ActionName("ProUptOne")]
        public int ProUptOne(string  name)
        {
            return bll.bll().ProUptOne(name);
        }
        [HttpPost]
        [ActionName("ProUptTwo")]
        public int ProUptTwo(string name)
        {
            return bll.bll().ProUptTwo(name);
        }

    }
}
